class @AdminUserEditModel extends Backbone.Model
    defaults:
        UserId:0
        Email: ''
        Login: ''
        Status: 0
        Password: ''
        ConfirmPassword: ''
        Avatar:''
        SuccessMessage: ''
    
    url: ->
        encodeURI SiteMap.Admin.Users.Edit + "?userId=" + @attributes.UserId
        
    parse: (response)->
        attrs = {}
        attrs.Email = response.Email
        attrs.Login = response.Login
        attrs.Status = response.Status
        if response.Avatar? 
            attrs.Avatar = response.Avatar

        return attrs;
